package com.mmy.service.group.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mmy.dao.group.TGroupNoticeRepository;
import com.mmy.domain.group.TGroupNotice;
import com.mmy.util.CodeUtil;

/**
 * @vesion
 * @description
 * @author liys
 * @date 2021-5-27
 */
@Service
public class GroupNoticeServiceImpl {

	@Autowired
	TGroupNoticeRepository dao;
	
	/**
	  * @descr 获得最大ID 
	  * @param 
	  * @return 
	  * @throws 
	  * @author liys
	  * @date 2021-7-27
	 */
	public int getMaxID() {
		Object objCode = dao.getMaxID();
		return CodeUtil.MaxID(objCode);
	}
	
	/**
	  * @descr 创建只包含ID的对象 
	  * @param 
	  * @return 
	  * @throws 
	  * @author liys
	  * @date 2021-7-27
	 */
	public int save(int id) {		
		return dao.save(id);
	}
	
	/**
	  * @descr 保存完整对象
	  * @param 
	  * @return 
	  * @throws 
	  * @author liys
	  * @date 2021-7-27
	 */
	public TGroupNotice save(TGroupNotice n) {
		return dao.save(n);
	}
}
